<?php
class Form_Audio extends Zend_Form
{

    public function __construct () {
        $this->setName('form_audio');
        $this->setAttrib('enctype', 'multipart/form-data');
        parent::__construct();
        
        $image = new Zend_Form_Element_File('audio');
        $image->setLabel('Music type (mp3). Max size - 10 mb')
            ->addValidator('Size', false, 10*1024*1024) //10 mb size
            ->addValidator('Extension', false, 'mp3')
            ->setRequired(true);
        
        $submit = new Zend_Form_Element_Submit('Upload');
        $submit->setLabel('Submit');
        
        $this->addElements(array($image, $submit));
    }
}
?>
